package books.ThinkingInJava.src.Chapter18;

import books.ThinkingInJava.src.Tools.Output;

import java.nio.charset.Charset;
import java.util.Iterator;
import java.util.SortedMap;

/**
 * 展示所有可能的编码格式
 *
 * @author bloodcolding
 * @since 12/29/2018 11:06 AM
 */
public class AvailableCharSets {
    public static void main(String[] arg) {
        SortedMap<String, Charset> charset = Charset.availableCharsets();
        Iterator<String> it = charset.keySet().iterator();
        while (it.hasNext()) {
            Output.println(it.next());
        }
    }
}

